/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pl.put.dcs.core.utils.serializer;

import java.io.InputStream;
import java.io.OutputStream;
import java.util.logging.Logger;
import pl.put.dcs.core.utils.serializer.adapters.XPathAdapter;

/**
 *
 * @author LukaszR
 */
public class SerializeManager implements SerializerInterfejs
{
    SerializerInterfejs adapterInst = new XPathAdapter();
    public static Logger log = Logger.getLogger( SerializeManager.class.getName() );
    
    @Override
    public void init()
    {
        adapterInst.init();
    }

    @Override
    public String serializeToString( Object object )
    {
        return adapterInst.serializeToString( object );
    }
    
    @Override
    public void serializeToFile( Object object, OutputStream out )
    {
        adapterInst.serializeToFile( object, out  );
    }
    
    @Override
    public Object unSerializeFromFile( InputStream in )
    {
        return adapterInst.unSerializeFromFile( in );
    }

    @Override
    public Object unSerializeFromString( String xml )
    {
        return adapterInst.unSerializeFromString( xml );
    }
    
}
